<template>
	<view class="u-page">
		<nav-bar title="个人信息" :show-right-icon="false"></nav-bar>
		<view class="u-page__item" style="background-color:#f5f6f7 ;">
			<uni-list>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">单位</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.companyname }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">部门</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.departname }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">账号</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.accountname }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">角色</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.roletitle }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">用户名</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.manname }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
				<template v-slot:header>
						<text class="slot-box slot-title">职务</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.duty }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
					<template v-slot:header>
						<text class="slot-box slot-title">单位电话</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.companymantel }}</text>
					</template>
				</uni-list-item>
				
				<uni-list-item>
				<template v-slot:header>
						<text class="slot-box slot-title">手机号</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.mantel }}</text>
					</template>
				</uni-list-item>
				<uni-list-item>
				<template v-slot:header>
						<text class="slot-box slot-title">注册时间</text>
					</template>
					<template v-slot:footer>
						<text class="slot-content">{{ userObject.created }}</text>
					</template>
				</uni-list-item>
			</uni-list>
		</view>
	</view>
</template>

<script setup>
	import {
		ref,
		reactive
	} from 'vue'
	import {
		onLoad,
		onShow
	} from '@dcloudio/uni-app'
import NavBar from '@/components/NavBar.vue';
import store from '../../../store';
	const unitId = ref('')
	const userObject = ref({})
	// 通过事件通道获取单位id
	onLoad((option) => {
		userObject.value = store.getters.table1;
		
	})

	function handleBack() {
		uni.navigateBack();
	}
</script>

<style lang="scss" scoped>
	.u-page {
		padding: 0;

		&__item {
			background-color: #fff;

			&__list {
				display: flex;
				justify-content: space-between;
				margin-bottom: 10px;
				color: #797E84;
				font-size: 13px;

				&__title {
					color: #333;
					font-size: 14px;
				}
			}


			&__title {
				color: #333;
				background-color: #fff;
				padding: 15px;
				font-size: 15px;

				&__slot-title {

					font-size: 14px;
				}
			}

			&__table {
				&__item {
					display: flex;
					justify-content: space-between;
					align-items: center;
					padding: 15px;
					flex: 1;

					&__left {
						color: #797E84;
						font-size: 13px;
					}

					&__right {
						display: flex;
						justify-content: space-around;
						align-items: center;
						color: #333;
						font-size: 14px;

						&__box {
							width: 40px;
							height: 40px;

							text-align: center;

						}
					}
				}
			}
		}
	}

	.u-collapse-content {

		font-size: 14px;
	}
	.slot-content{
		font-size: 16px;
		color: #333;
		float: right;
	}
	.slot-title{
		font-size: 16px;
		color: #999;
	}
</style>